﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MerchantCustomerList.aspx.cs" Inherits="carinsurance_merchant_MerchantCustomerList" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <table width="100%" cellpadding="5">
        <tr>
            <td style="width: 800px">
                <h1>
                    <asp:Label runat="server" Text="Merchant Customer List" ID="lblPageName"></asp:Label></h1>
            </td>
            <td style="width: 200px">
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" Text="<%$Resources:General,LangOption%>" Visible="false"
        ID="lblLangOption" /><asp:HiddenField ID="hidLastTab" Value="0" runat="server" />
    <asp:HiddenField ID="hidCallType" Value="0" runat="server" />
    <asp:HyperLink runat="server" Visible="false" ID="lnkNewCarUsage" NavigateUrl="#"
        Text="New"></asp:HyperLink>
    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
            <ContentTemplate>
                <asp:Label runat="server" ID="lblNewCallMessage" /></ContentTemplate>
        </asp:UpdatePanel>
    <%--<div class="bc2">
        <asp:Label runat="server" ID="lblSiteLocation" Text="You are here : " CssClass="bclist" />
        <asp:SiteMapPath SiteMapProvider="SiteUserSiteMapProvider" ID="smpProvider" runat="server"
            PathSeparator=" : ">
            <PathSeparatorStyle CssClass="bcarrow" />
            <CurrentNodeStyle CssClass="bclist" />
            <NodeStyle CssClass="bclink" />
            <RootNodeStyle CssClass="bclink" />
        </asp:SiteMapPath>
        <div class="clear">
        </div>
    </div>--%>
    <div class="topdisplay pb10">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <asp:Panel ID="pnlSearch" runat="server">
                <tr>
                    <td width="190">
                        <label>
                            Search By (Name, Email, CarId) :
                        </label>
                    </td>
                    <td width="120">
                        <asp:TextBox ID="txtSearch" runat="server" Width="120px" ToolTip="Name, Email, CarId"
                            MaxLength="100" />
                    </td>
                    <td width="140">
                        <label>
                            <%=GetGlobalResourceObject("CarInsurance", "ReferenceNo")%>
                            ONLY</label>
                    </td>
                    <td width="120">
                        <asp:TextBox ID="txtSearchRefNo" runat="server" Width="100px" ToolTip="<%$Resources:CarInsurance, ReferenceNo%>"
                           MaxLength="20" />
                    </td>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$Resources:General,Search%>" ValidationGroup="search"
                            OnClick="btnSearch_Click" CssClass="blueB ml10" />
                        &nbsp;&nbsp;
                        <asp:Label runat="server" ID="lblSearchMessage" Text="" ForeColor="Red" />
                    </td>
                    <td style="text-align: right">
                        <asp:Button runat="server" ID="btnAppDtl" Text="<%$Resources:General,ApplicationDetails%>"
                            OnClick="btnAppDtl_Click" Width="140px" Height="30px" Font-Bold="true" ValidationGroup="none"
                            CausesValidation="false" OnClientClick="return GoBackConfirm();" CssClass="blueB ml10"
                            TabIndex="99" />
                    </td>
                    <td style="text-align: right">
                        <asp:Button runat="server" ID="btnAppSum" Text="<%$Resources:General,ApplicationFormSummary%>"
                            OnClick="btnAppSum_Click" Width="140px" Height="30px" Font-Bold="true" ValidationGroup="none"
                            CausesValidation="false" OnClientClick="return GoBackConfirm();" CssClass="blueB ml10"
                            TabIndex="99" />
                    </td>
                </tr>
            </asp:Panel>
        </table>
    </div>
    <div style="display: none;">
        <asp:TextBox ID="txtCEId" runat="server" CausesValidation="false" Text="0"></asp:TextBox>
    </div>
    <div id="divCustomer" class="toggle" runat="server">
        <div class="title opened" id="opened1">
            <img src="../../images/icons/dark/imagesList.png" alt="" class="titleIcon" />
            <h6>
                <asp:Label ID="lblLastCallStatusCaption" runat="server" Text="Merchant" />
                <asp:Label ID="lblLastCallStatusMessage" runat="server" Text="" ForeColor="Red" />
            </h6>
        </div>
        <div class="form">
            <fieldset class="step">
                <asp:UpdatePanel ID="upnlCustomer" runat="server">
                    <ContentTemplate>
                        <asp:Panel ID="pnlCustomer" runat="server">
                            <asp:GridView ID="grvCustomer" runat="server" AllowPaging="false" AutoGenerateColumns="False"
                                Width="100%" EmptyDataText="<%$Resources:General,ErrNodata%>" CssClass="sTable"
                                GridLines="None" DataKeyNames="CEId,RefCEUserID" 
                                OnRowCommand="grvCustomer_RowCommand">
                                <Columns>
                                    <asp:BoundField DataField="CEId" Visible="false" ReadOnly="True" SortExpression="CEId" />
                                    <asp:BoundField DataField="RefCEUserID" Visible="false" ReadOnly="True" SortExpression="RefCEUserID" />
                                    <asp:BoundField DataField="MerchantName" ItemStyle-Width="250px" HeaderText="Merchant Name"
                                        SortExpression="MerchantName">
                                        <ItemStyle Width="250px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="FullName" ItemStyle-Width="250px" HeaderText="Name" SortExpression="FullName">
                                        <ItemStyle Width="250px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Email" ItemStyle-Width="250px" HeaderText="Email" SortExpression="Email">
                                        <ItemStyle Width="250px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" />
                                    <asp:CommandField Visible="false" ButtonType="Button" ControlStyle-CssClass="blueB ml10"
                                        ItemStyle-HorizontalAlign="Center" HeaderText="Edit" SelectText="Edit" ShowSelectButton="true" />
                                    <asp:TemplateField HeaderText="CarDetail">
                                        <ItemTemplate>
                                            <asp:Button runat="server" ID="btnCar" Text="CarDetail" CommandName="MyCar" CommandArgument='<%#Eval("CEId")%>'
                                                CssClass="blueB ml10" />
                                        </ItemTemplate>
                                    </asp:TemplateField>       
                                    <asp:TemplateField HeaderText="Quote" Visible="false">
                                        <ItemTemplate>
                                            <asp:Button runat="server" ID="btnQuote" Text="Quote" CommandName="MyQuote" CommandArgument='<%#Eval("CEId")%>'
                                                OnClientClick="javascript:return SubmitGotoQuoteConfirm();" CssClass="blueB ml10" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle />
                                <PagerStyle />
                                <SelectedRowStyle />
                                <HeaderStyle />
                                <EditRowStyle />
                                <AlternatingRowStyle />
                                <RowStyle />
                            </asp:GridView>
                            <div class="clear">
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </fieldset>
        </div>
    </div>
    <asp:UpdatePanel ID="upnlCar" runat="server">
        <ContentTemplate>
            <div id="divCar" class="toggle" runat="server" visible="false">
                <div class="title opened" id="Div1">
                    <img src="../../images/icons/dark/imagesList.png" alt="" class="titleIcon" />
                    <h6>
                        <asp:Label ID="Label1" runat="server" Text="Merchant Car" />
                        <asp:Label ID="Label2" runat="server" Text="" ForeColor="Red" />
                    </h6>
                </div>
                <div class="form">
                    <fieldset class="step">
                        <asp:Panel ID="pnlCar" runat="server">
                            <asp:GridView ID="grvMerchantCar" runat="server" AllowPaging="false" AutoGenerateColumns="False"
                                Width="100%" EmptyDataText="<%$Resources:General,ErrNodata%>" CssClass="sTable"
                                GridLines="None" DataKeyNames="CarId,CECarPolicyId,RefCEUserId" OnRowCommand="grvMerchantCar_RowCommand">
                                <Columns>
                                    <asp:BoundField DataField="CarId" HeaderText="CarId" ReadOnly="True" SortExpression="CarId"
                                        ItemStyle-Width="80px" ItemStyle-Font-Bold="true" ItemStyle-ForeColor="Red" ItemStyle-HorizontalAlign="Center"
                                        ItemStyle-BorderColor="LightGray" />
                                    <asp:BoundField DataField="MakeModelDesc" ItemStyle-Width="250px" HeaderText="Make / Model"
                                        SortExpression="MakeModel">
                                        <ItemStyle Width="250px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ManufactYear" ItemStyle-Width="70px" HeaderText="Car Year"
                                        SortExpression="ManufactYear">
                                        <ItemStyle Width="70px"></ItemStyle>
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Insurance" HeaderText="Insurance Type" SortExpression="Insurance" />
                                    <asp:BoundField DataField="CommencementDate" ItemStyle-Width="120px" HeaderText="CommencementDate"
                                        SortExpression="CommencementDate" />
                                    <asp:BoundField DataField="QuoteDate" ItemStyle-Width="150px" HeaderText="QuoteDate"
                                        SortExpression="QuoteDate" />
                                    <asp:TemplateField HeaderText="Quote">
                                        <ItemTemplate>
                                            <asp:Button runat="server" ID="btnCar" Text="Quote" CommandName="MyQuote" CommandArgument='<%#Eval("CarId")%>'
                                                OnClientClick="javascript:return SubmitGotoCarConfirm();" CssClass="blueB ml10" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle />
                                <PagerStyle />
                                <SelectedRowStyle />
                                <HeaderStyle />
                                <EditRowStyle />
                                <AlternatingRowStyle />
                                <RowStyle />
                            </asp:GridView>
                            <div class="clear">
                            </div>
                        </asp:Panel>
                    </fieldset>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript">
    
        function GoBackConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("CarInsurance", "ConfirmBack")%>');
            return _retVal;
        }
        
        function SubmitCompanyDeleteConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmDelete")%>');
            return _retVal;
        }

        function SubmitGotoCarConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmNext")%>');
            return _retVal;
        }

        function SubmitGotoFileConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmtoGoFileUpload")%>');
            return _retVal;
        }

        function SubmitGotoQuoteConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmtoGoManualQuote")%>');
            return _retVal;
        }
        
    </script>

</asp:Content>

